package cn.schoolwow.util.module.check.instance.flow;

import cn.schoolwow.quickflow.domain.FlowContext;
import cn.schoolwow.quickflow.flow.BusinessFlow;

public class CheckIsTrueFlow implements BusinessFlow {
    @Override
    public void executeBusinessFlow(FlowContext flowContext) throws Exception {
        boolean isTrue = (boolean) flowContext.checkData("isTrue");
        String message = (String) flowContext.checkData("message");
        if(!isTrue){
            throw new IllegalArgumentException(message);
        }
    }

    @Override
    public String name() {
        return "实例-检查非空数组字段";
    }
}
